<div class="vip_right">
    <table width="792" border="0" cellspacing="0" cellpadding="0">
      <tbody><tr class="table_title">
        <td style="background-color: rgb(248, 215, 208);">入住单号</td>
        <td style="background-color: rgb(248, 215, 208);">房间</td>
        <td style="background-color: rgb(248, 215, 208);">房型</td>
        <td style="background-color: rgb(248, 215, 208);">入住时间</td>
        <td style="background-color: rgb(248, 215, 208);">离开时间</td>
        <td style="background-color: rgb(248, 215, 208);">总金额</td>
        <td style="background-color: rgb(248, 215, 208);">下单时间</td>
        <td style="background-color: rgb(248, 215, 208);">状态</td>
        <td style="background-color: rgb(248, 215, 208);">操作</td>
      </tr>
      <volist name="checkins" id="order">
            <tr  {$order.id|readCheckinClass=$i}>
                <td><a href="__URL__/index/entry/checkindetail/id/{$order.id}">{$order.checkin_no}</a></td><td>{$order.room_id|getRoomNo}</td><td>{$order.house_id|getModelName=House}</td>
                <td>{$order.start_time|toDate}</td><td>{$order.end_time|toDate}</td><td>{$order.totalprice}</td>
                <td>{$order.create_time|toDate}</td><td>{$order.status|getConfigVal=checkinStatus}</td>
                <td><a href="__URL__/index/entry/checkindetail/id/{$order.id}">详情</a>&nbsp;</td>
            </tr>
        </volist>

      
      </tr>
    </tbody></table>
    <span class="change_page">
        入住消费信息 {$page} 
    </span>
</div>

<php>
    function readCheckinClass($id,$i){
        $rs = D('CostdetailView')->where('member_id ='.$_SESSION[C('USER_AUTH_KEY')] .' and 
        Costdetail.status =2 and cost_type = 0 and checkin_id = '.$id)->find();
        if($rs){
            if ($i%2 == 0 )
                return "class='out tdpink'";
            else
                return "class='out white'";
        }
        else{
            if ($i%2 == 0 )
                return "class='tdpink'";
            else
                return "class='white'";
        }
    }
</php>